const app = getApp();
const WxParse = require('../../wxParse/wxParse.js');
Page({
    data:{
        title:'',
        time:'',
        type:'',
        id:''
    },
    onLoad(option){
        console.log(option)
        this.setData({
            id:option.id
        });
        app.axios('/newinfo/'+this.data.id,'GET',response=>{
            var that = this;
            if (response){
                let {title,created_at,cate,content} = response;
                WxParse.wxParse('article', 'html', content, that, 5);
                this.setData({
                    title:title,
                    time:created_at,
                    type:cate
                })
            }
        })
    }
});
